<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="./icon/ico.ico">
<%@page contentType="text/html; charset=UTF-8" language="java"%>
<title>注册</title>

<!-- Bootstrap core CSS -->
<link href="./css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="./css/signin.css" rel="stylesheet">

<!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
<!--[if lt IE 9]><script src="../../assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
<script src="./js/ie-emulation-modes-warning.js"></script>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="./js/ie10-viewport-bug-workaround.js"></script>

</head>
<body>
	<div class="container">
		<form action="RegisterAction" class="form-signin" Fsrole="form"
			method="post">
			<h2 class="form-signin-heading">请填写您的信息</h2>
			<input type="text" class="form-control" placeholder="用户名"
				name="username" required autofocus> <input type="password"
				name="password" class="form-control" placeholder="密码" required>
			<input type="password" name="password_" class="form-control"
				placeholder="重复密码" required> <input type="email"
				name="email" class="form-control" placeholder="电子邮箱" required>

			<button name="submit" class="btn btn-lg btn-primary btn-block"
				type="submit">注册</button>
			<a href="login.jsp" name="submit"
				class="btn btn-lg btn-primary btn-block">返回</a>
		</form>
		<%
			String hint = (String) request.getAttribute("hint");
		%>
		<%
			if (hint != null) {
				System.out.println(hint);
				if (new Integer(hint) == -1) {
		%>
		<script type="text/javascript">
			alert("请输入相同的密码");
		</script>
		<%
			} else if (new Integer(hint) == 0) {
		%>
		<script type="text/javascript">
			alert("用户名已经被注册了, 请重新输入");
		</script>
		<%
			} else if (new Integer(hint) == 1) {
		%>
		<body>
			<script language='javascript'>
				document.location = './login.jsp'
			</script>
		</body>
		</script>
		<%
			} else if (new Integer(hint) == 2) {
		%>
		<script type="text/javascript">
			alert("有奇怪的问题呢@_@, 请重新提交");
		</script>
		<%
			}
			}
		%>
	</div>



</body>
</html>
